import service from '@/utils/request'
import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    // 创建招标报名
    create (params) {
        return httpPost({
            url: '/tender/enroll/create',
            params
        })
    },
    // 新增业绩信息
    // achievementCreate (params) {
    //     return httpPost({
    //         url: '/tender/enroll/achievement/create',
    //         params
    //     })
    // },
    // // 修改业绩
    // achievementUpdate (params) {
    //     return httpPost({
    //         url: '/tender/enroll/achievement/update',
    //         params
    //     })
    // },
    // 根据ID查询
    findById (id) {
        return httpGet({
            url: `/tender/enroll/findById/${id}`
        })
    },
    // 招标报名列表
    // listEnrollByEntity (params) {
    //     return httpPost({
    //         url: '/tender/materialProvisioning/eroll/listEnrollByEntity',
    //         params
    //     })
    // },
    // 根据ID批量删除招标报名
    enrollBatchDelete (params) {
        return httpPost({
            url: '/tender/enroll/batchDelete',
            params: qs.stringify({ ids: params }),
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 新增(修改)企业资质信息
    certificateCreate (params) {
        return httpPost({
            url: '/tender/enroll/certificate/create',
            params
        })
    },
    // 新增(修改)业绩信息
    achievementCreate (params) {
        return httpPost({
            url: '/tender/enroll/achievement/create',
            params
        })
    },
    // 新增(修改)企业主要管理人员
    personCreate (params) {
        return httpPost({
            url: '/tender/enroll/person/create',
            params
        })
    }
}

export default request
